<template>
  <div class="search">
    <f-form ref="form" :action="api.recDeliBkReq" :form-key="this.formItem.recDecId" >
      <f-form-item label="状态"  name="status"    :value="formItem.status" />
      <f-form-item label="项目ID"  name="projectId"    :value="formItem.projectId" />
      <f-form-item label="项目代码"  name="projectCode"    :value="formItem.projectCode" />
      <f-form-item label="项目名称"  name="projectName"    :value="formItem.projectName" />
      <f-form-item label="专业代码"  name="majorCode"    :value="formItem.majorCode" />
      <f-form-item label="专业名称"  name="majorName"    :value="formItem.majorName" />
      <f-form-item label="工程包代码"  name="packageNo"    :value="formItem.packageNo" />
      <f-form-item label="工程包名称"  name="packageName"    :value="formItem.packageName" />
      <f-form-item label="用户ID"  name="userId"    :value="formItem.userId" />
      <f-form-item label="申请人"  name="userName"    :value="formItem.userName" />
      <f-form-item label="申请时间"  name="appTime"    :value="formItem.appTime" />
      <f-form-item label="本次采购数量"  name="purchaseNum"    :value="formItem.purchaseNum" />
      <f-form-item label="在途数量"  name="onLineNum"    :value="formItem.onLineNum" />
      <f-form-item label="到货数量"  name="receiveNum"    :value="formItem.receiveNum" />
      <f-form-item label="需求计划日期"  name="receivedDate"    :value="formItem.receivedDate" />
      <f-form-item label="供应商ID"  name="vendorId"    :value="formItem.vendorId" />
      <f-form-item label="发料ID号_SAP"  name="zid"    :value="formItem.zid" />
      <f-form-item label="发料行项目_SAP"  name="zitem" dataType="number"   :value="formItem.zitem" />
      <f-form-item label="A07：发料，A03：取消发料_SAP"  name="action"    :value="formItem.action" />
      <f-form-item label="凭证中的过帐日期_SAP"  name="budat"    :value="formItem.budat" />
      <f-form-item label="凭证中的凭证日期_SAP"  name="bldat"    :value="formItem.bldat" />
      <f-form-item label="证抬头文本_SAP"  name="bktxt"    :value="formItem.bktxt" />
      <f-form-item label="班组编码_收货方_SAP"  name="supplierCode"    :value="formItem.supplierCode" />
      <f-form-item label="班组名称"  name="supplierName"    :value="formItem.supplierName" />
      <f-form-item label="本次领料量_以录入项单位表示的数量_SAP"  name="recNumThis"    :value="formItem.recNumThis" />
      <f-form-item label="预留/相关需求的编号_SAP"  name="reserveNo"    :value="formItem.reserveNo" />
      <f-form-item label="预留 / 相关需求的项目编号_SAP"  name="reserveRow"    :value="formItem.reserveRow" />
      <f-form-item label="库存地点_SAP"  name="lgort"    :value="formItem.lgort" />
      <f-form-item label="扩展字段1_SAP"  name="ext01"    :value="formItem.ext01" />
      <f-form-item label="扩展字段2_SAP"  name="ext02"    :value="formItem.ext02" />
      <f-form-item label="扩展字段3_SAP"  name="ext03"    :value="formItem.ext03" />
      <f-form-item label="扩展字段4_SAP"  name="ext04"    :value="formItem.ext04" />
      <f-form-item label="扩展字段5_SAP"  name="ext05"    :value="formItem.ext05" />
      <f-form-item label="消息类型_SAP回调"  name="msgtyFromSap"    :value="formItem.msgtyFromSap" />
      <f-form-item label="消息文本_SAP回调"  name="msgtxFromSap"    :value="formItem.msgtxFromSap" />
      <f-form-item label="物料凭证编号_SAP回调"  name="mblnrFromSap"    :value="formItem.mblnrFromSap" />
      <f-form-item label="物料凭证中的项目_SAP回调"  name="mblppoFromSap" dataType="number"   :value="formItem.mblppoFromSap" />
      <f-form-item label="物料凭证的年份_SAP回调"  name="mjahrFromSap" dataType="number"   :value="formItem.mjahrFromSap" />
      <f-form-item label=""  name="createTime"    :value="formItem.createTime" />
      <f-form-item label=""  name="updateTime"    :value="formItem.updateTime" />
    </f-form>
  </div>
</template>
<script>
  import api from './js/api'
  export default {
    name: 'brdrbForm',
    props: {},
    data() {
      return {
        refs:this.$refs,
        api:  Object.assign(api, this.api),
        isAdd: true,//是否是添加模式
        loaded: false,//是否加载完成
        formItem: this.getFormItem()
      }
    },
    methods: {
      getFormItem() {
        return {
          recDecId: '',
          status: '',
          projectId: '',
          projectCode: '',
          projectName: '',
          majorCode: '',
          majorName: '',
          packageNo: '',
          packageName: '',
          userId: '',
          userName: '',
          appTime: '',
          purchaseNum: '',
          onLineNum: '',
          receiveNum: '',
          receivedDate: '',
          vendorId: '',
          zid: '',
          zitem: '',
          action: '',
          budat: '',
          bldat: '',
          bktxt: '',
          supplierCode: '',
          supplierName: '',
          recNumThis: '',
          reserveNo: '',
          reserveRow: '',
          lgort: '',
          ext01: '',
          ext02: '',
          ext03: '',
          ext04: '',
          ext05: '',
          msgtyFromSap: '',
          msgtxFromSap: '',
          mblnrFromSap: '',
          mblppoFromSap: '',
          mjahrFromSap: '',
          createTime: '',
          updateTime: ''
        }
      },
      //表单赋值
      setData(data) {
        this.$refs.form.resetFields()
        this.formItem = this.getFormItem()
        if (data && data.recDecId) {
          let params={
              recDecId:data.recDecId
          }
          this.refs['form'].getDetails(params,(data)=>{
             this.formItem=data
             this.loaded = true
          })
          this.isAdd = false
        } else {
          this.loaded = true
        }
      },
      //提交表单
      handleSubmit(callback) {
        this.$refs.form.submit({  }, callback)
      }
    },
    created() {
    },
    components: {}
  }
</script>

<style scoped lang="less" rel="stylesheet/less">

</style>
